package com.web.onirigi.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.web.onirigi.dao.HotelDao;
import com.web.onirigi.model.RoomBean;
import com.web.onirigi.service.HotelService;

@Service
public class HotelServiceImpl implements HotelService {

	@Autowired
	private HotelDao hotelDao;
	
	@Override
	public List<RoomBean> selectRoomBeanList(RoomBean bean) {
		if(bean.getPageNum() !=null) {
			PageHelper.startPage(bean.getPageNum(), bean.getPageSize());
		}
		return hotelDao.selectRoomBeanList(bean);
	}

	@Override
	public void updateRoomBean(RoomBean bean) {
		hotelDao.updateRoomBean(bean);
	}

	@Override
	public void deleteRoomeBean(RoomBean bean) {
		hotelDao.deleteRoomeBean(bean);
	}

	@Override
	public Integer addRoomBean(RoomBean bean) {
		return hotelDao.addRoomBean(bean);
	}

	
}
